New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression

Package Overview
Dependencies
Maintainers
4
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression

Rename destructuring parameter to workaround https://bugs.webkit.org/show_bug.cgi?id=220517

7.25.9
latest
Source
npm
Version published
Weekly downloads
18M
-18.75%
Maintainers
4
Weekly downloads
 
Created

What is @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression?

The @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression package is designed to address a specific bug in Safari related to the collision of variable names in destructuring assignments within function expressions. This plugin works as part of the Babel toolchain to transform affected code into a format that avoids the bug, ensuring compatibility and preventing runtime errors in Safari.

What are @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression's main functionalities?

Bug Fix for Safari Destructuring Collision

This code sample demonstrates a scenario where the plugin would transform the function expression to avoid a naming collision that Safari cannot handle. Without the plugin, this code might cause a runtime error in Safari due to the destructuring assignment.

const example = ({ a }) => { const { a: b } = someObject; return a + b; };

Other packages similar to @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression

Keywords

babel-plugin

FAQs

Package last updated on 22 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts